<%--
  Created by IntelliJ IDEA.
  User: KaiFaBu010
  Date: 2017-12-13
  Time: 11:36
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <jsp:include page="/WEB-INF/jsp/head.jsp">
        <jsp:param value="游戏账号分数变化" name="pageTitle"/>
    </jsp:include>
    <script src="/js/common.js"></script>
</head>

<style>
    a:link {color:green;}
    a:hover {color:#FF00FF;}
</style>
<body class="easyui-layout">


<div class="easyui-panel" data-options="fit:true" style="width:100%;height:100%;padding:10px;">
    <table id="gameAccByDelQueryTb" class="easyui-datagrid" style="width:100%;height:100%">

    </table>
    <div id="tb" style="padding:20px;width:100%;">

        <table>
            <tr>
                <td>查询的时间:</td>
                <td>
                    <input type="text" class="yj-text" id="ssbegin" name="ssbegin" style="width: 80px;" readonly="readonly" onclick="WdatePicker({maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" value=""/>
                    <input type="text" class="yj-text" id="ssend" name="ssend" style="width: 80px;" readonly="readonly" onclick="WdatePicker({maxDate:'%y-%M-%d',dateFmt:'yyyy-MM-dd'})" value=""/>
                </td>
                <td>查询用户:</td>
                <td>
                    <div id="User">
                        <select id="uid" class="yj-select uid" name="uid" ></select>
                        <span class="msg-box" for="uid" style="position:absolute;"></span>
                    </div>
                </td>
            </tr>
        </table>
        <a id="flush_btn" title="刷新" href="#" class="easyui-linkbutton"><i class="fa fa-refresh"></i>刷新</a>
        <a id="lbtnFind" href="#" title="搜索" class="easyui-linkbutton"><i class="fa fa-refresh"></i>搜索</a>
    </div>
</div>


<script>
    //用户搜索选择
    $('#User').cxSelect({
            url: '/user/getAll',
            selects: ['uid'],
            emptyStyle: 'none',
            jsonName: 'relname',
            jsonValue: 'uid'
        }
    );


    //刷新
    $("#flush_btn").click(function () {
        location.reload();
    });


    $('#lbtnFind').click(function (e) {
        e.preventDefault();
        e.stopPropagation();
        var ssbegin = $('#ssbegin').val();
        var ssend = $('#ssend').val();
        var helpeduid = $('#helpeduid').val();
        $("#gameAccByDelQueryTb").datagrid("load", {ssbegin: ssbegin, ssend: ssend, helpeduid: helpeduid});
    });


    $('#gameAccByDelQueryTb').datagrid({
        iconCls: 'icon-search',
        title: '游戏账号分数变化',
        url: '/dataQuery/getAllGameAccount',
        queryParams: {ssbegin: "", ssend: ""},
        method: 'get',
        singleSelect: "false",
        checkOnSelect: 'false',
        rownumbers: true,
        pagination: true,
        toolbar: '#tb',
        pageSize: 20,
        pageList: [10, 20, 30],
        columns: [[
            {field: 'ck', checkbox: true}
            , {field: 'adid', align: 'center', width: '100', title: '游戏账号交易记录ID', hidden: "true"}
            , {field: 'did', width: '300', align: 'left', title: '交易ID', hidden: "true"}
            , {field: 'gid', width: '300', align: 'left', title: '游戏ID', hidden: "true"}
            , {field: 'gname', width: '100', align: 'left', title: '游戏名字'}
            , {field: 'aid', width: '300', align: 'left', title: '游戏账号id', hidden: "true"}
            , {field: 'accountnum', width: '100', align: 'left', title: '游戏账号文字'}
            , {field: 'initialscore', align: 'left', width: '100', title: '账号上现有分值', formatter: formatNumber}
            , {field: 'sendscore', align: 'left', width: '100', title: '随账出分', formatter: formatNumber}
            , {field: 'getscore', align: 'left', width: '100', title: '随账得分', formatter: formatNumber}
            , {field: 'canotscore', align: 'left', width: '100', title: '未敲分数', formatter: formatNumber}
            , {field: 'finalscore', align: 'left', width: '100', title: '录入的账号最后分', formatter: formatNumber}
            , {field: 'worryscore', align: 'left', width: '100', title: '计算比较的出错分', formatter: formatNumber}
            , {field: 'shift', align: 'left', width: '200', title: '班次',formatter: StateCodetoString}
            , {field: 'handlerid', align: 'right', width: '100', title: '操作者ID', hidden: "true"}
            , {field: 'handlers', align: 'left', width: '100', title: '操作者'}
            , {field: 'remark', align: 'left', width: '100', title: '其他说明'}
            , {field: 'modifytime', align: 'center', width: '100', title: '记录时间', formatter: formatDatebox}
        ]],onLoadSuccess: function (data) {
            if (data.total == 0) {
                $.messager.alert('提示信息', '没有相关记录！', 'warning');
            }
        }
    });

</script>

</body>
</html>
